package com.fhz.mvvmshopjava.ui.classify;

import androidx.lifecycle.LiveData;

import com.fhz.mvvmshopjava.api.ServiceApi;
import com.fhz.mvvmshopjava.core.BaseDataSource;
import com.fhz.mvvmshopjava.entity.Banner;
import com.fhz.mvvmshopjava.entity.Category;
import com.fhz.mvvmshopjava.utils.RetrofitManger;
import com.fhz.utilsfhz.ApiResponse;

import java.util.List;

import javax.inject.Inject;

/**
 * 时间:2022/6/8
 *
 * @author msfeng
 * 简述: TODO
 */
public class ClassifyDataSource extends BaseDataSource {

    @Inject
    public ClassifyDataSource() {
    }

    public LiveData<ApiResponse<List<Category>>> getCategory(String type){
        return RetrofitManger.getInstance().getRetrofit().create(ServiceApi.class).getCategory(type);
    }
}

